# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: K. Hampf <khampf@users.sourceforge.net>
# Contributor: Skunnyk <skunnyk@archlinux.fr>

pkgname=playonlinux
pkgver=4.2.1
pkgrel=1
pkgdesc="GUI for managing Windows programs under linux"
url="http://www.playonlinux.com/"
license=('GPL')
depends=('wine' 'imagemagick' 'xterm' 'wxpython' 'cabextract' 'unzip' 'mesa-demos' 'gnupg'
         'icoutils' 'xdg-user-dirs' 'libxmu' 'netcat' 'wget' 'p7zip')
arch=('any')
source=(http://www.playonlinux.com/script_files/PlayOnLinux/${pkgver/.0/}/PlayOnLinux_${pkgver/.0/}.tar.gz
        PlayOnLinux.desktop
        use-python2.patch)
options=(!strip)
md5sums=('d257235c548d70dc4a8820f06ee4d314'
         'c35b61fb168c4ef7740ad113996ea359'
         '39a97b77d69431429e6d9d80f826fd17')

package() {
  cd "$srcdir/$pkgname"

  patch -Np1 -i ../use-python2.patch

  install -d $pkgdir/usr/share/$pkgname
  install -d $pkgdir/usr/bin 
  cp -r $srcdir/$pkgname/ $pkgdir/usr/share/

  echo "#!/bin/bash" > $pkgdir/usr/bin/$pkgname 
  echo "/usr/share/$pkgname/$pkgname \"\$@\"" >> $pkgdir/usr/bin/$pkgname
  chmod +x  $pkgdir/usr/bin/$pkgname

  install -D -m644 $srcdir/$pkgname/etc/playonlinux32.png $pkgdir/usr/share/pixmaps/playonlinux32.png 
  install -D -m644 $srcdir/PlayOnLinux.desktop $pkgdir/usr/share/applications/playonlinux.desktop 
}
md5sums=('4f80195c28d5424045b6471032d173b3'
         'c35b61fb168c4ef7740ad113996ea359'
         '39a97b77d69431429e6d9d80f826fd17')
